package com.wenwan.manage.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import com.wenwan.manage.service.ArticleVolumeWellService;

import javax.annotation.Resource;

/**
 * 普通文章点赞量
 * 
 * @author Admin
 *
 */
@Controller
@RequestMapping(value = "/article/volume/well")
public class ArticleVolumeWellController {

	@Autowired
	private ArticleVolumeWellService articleVolumeWellService;

	@ResponseBody
	@RequestMapping(value = "/create", method = { RequestMethod.POST })
	public Map<String, Object> create(@RequestParam(required = true) String articleId,
			@RequestParam(required = true) String userId) {
		return articleVolumeWellService.create(articleId, userId);
	}

	@ResponseBody
	@RequestMapping(value = "/delete/by/article/id/and/user/id", method = { RequestMethod.POST })
	public Map<String, Object> deleteByArticleIdAndUserId(@RequestParam(required = true) String articleId,
			@RequestParam(required = true) String userId) {
		return articleVolumeWellService.deleteByArticleIdAndUserId(articleId, userId);
	}

}
